package collectionFramework;

import java.util.HashSet;

// HashSet: Unordered, Unsorted, Unique

class A {
}

class B {
}

public class MyHashSet {
	public static void main(String[] args) {
		HashSet<Object> hs = new HashSet<Object>();
		Integer a = new Integer(10);
		String c = "Java";
		A objA = new A();
		B objB = new B();
		System.out.println(hs.size());
		System.out.println(hs.isEmpty());
		hs.add(a);
		hs.add(10.157);
		hs.add(objA);
		hs.add(objB);
		hs.add(c);
		System.out.println(hs);
		System.out.println(hs.size());
		System.out.println(hs.isEmpty());
		System.out.println("Search for 10 : " + hs.contains(10));
		System.out.println("Search for 100 : " + hs.contains(100));
		hs.remove(a);
		System.out.println(hs);
		hs.clear();
		System.out.println(hs);
	}
}
